<template>
  <div class="components-container">
    <!-- 新增修改 -->
    <sweet-modal ref="dialog" class="dialog" :sweetModalMaxWidth="maxWidth">
      <h3>{{title}}</h3>
      <div>
        <fieldset class="layui-elem-field layui-field-title">
          <legend>
            <icon-svg icon-class="jbifm" />&nbsp;基本信息</legend>
        </fieldset>
        <div style="margin:10px 50px;">
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">逝者姓名</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPDEADNAME"></el-input>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">逝者年龄</label>
              <div class="layui-input-inline">
                <el-input-number v-model="prpData.PRPDEADAGE" :min="0"></el-input-number>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">逝者性别</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPDEADSEX" filterable>
                  <el-option v-for="item in sexType" :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="IsShowDeathDate">
              <label class="layui-form-label">死亡日期</label>
              <div class="layui-input-inline">
                <el-date-picker type="date" v-date v-model="prpData.PRPDEATHDATE"></el-date-picker>
              </div>
            </div>
            <div class="layui-inline" v-if="IsShowDeathReason">
              <label class="layui-form-label">死亡原因</label>
              <div class="layui-input-inline">
                <el-cascader :options="cause" v-model="cauinfo" filterable>
                </el-cascader>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">接尸时间
                <span class="text-danger">*</span>
              </label>
              <div class="layui-input-inline chooseTime">
                <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="prpData.PRPWORKDATE"></el-date-picker>
                <el-time-picker ref="choosetime" style="width:75px;float:left" :default-value="timeDefaultShow" clear-icon="null" v-date v-model="prpData.PRPWORKTIME" format='HH:mm'></el-time-picker>
              </div>
            </div>
            <div class="layui-inline" v-if="DisReserveNum">
              <label class="layui-form-label">预约编号</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPDAYNUM"></el-input>
              </div>
            </div>
            <div class="layui-inline" v-if="!isShowyy">
              <label class="layui-form-label">车辆类型</label>
              <div class="layui-input-inline">
                <el-select v-model="cdhcartype" filterable @change="pickupcardata($event)">
                  <el-option v-for="item in carLics" :key="item.value" :label="item.label" :value="item.label">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="!isShowyy">
              <label class="layui-form-label">接运车辆</label>
              <div class="layui-input-inline" ref="pickupcars">
                <el-select v-model="pickupcar" filterable>
                      <el-option label="不选择" :value="null"></el-option>
                  <el-option v-for="item in pickupcardatas" :key="item.Value" :label="item.label" :value="item.label">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">出车里程</label>
              <div class="layui-input-inline">
                <el-input-number v-model="prpData.Cdh.CDHMILEAGE" :min="0" style="width:150px"></el-input-number>公里
              </div>
            </div>
            <div class="layui-inline" v-if="!isShowyy">
              <label class="layui-form-label">驾驶员</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.Cdh.CDHDRIVER">
                  <el-option label="不选择" :value="null"></el-option>
                  <el-option v-for="item in drivers" :key="item.value" :label="item.label" :value="item.value">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="IsShowOvertimeAndLift">
              <label class="layui-form-label">接运员</label>
              <div class="layui-input-inline">
                <el-select v-model="collectMember" placeholder="接运员" multiple>
                  <el-option v-for="item in carriers" :key="item.value" :label="item.label" :value="item.value"></el-option>
                </el-select>
              </div>
            </div>
          </div>

          <div class="layui-form-item">
            <div class="layui-form-item">
              <div class="layui-inline">
                <label class="layui-form-label">接尸地点</label>
                <div class="layui-input-inline" v-if="isaddress">
                  <el-select v-model="prpData.PRPADDID" :disabled="!IsUseSelect" @visible-change="selectAddr">
                    <el-option v-for="item in commonAddr" :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue"></el-option>

                  </el-select>
                </div>
                <div class="layui-input-inline" v-if="!isaddress" style="width:288px">
                  <el-cascader class="dz" ref="address" v-model="arr" style="width:288px" :options="addressOptions" change-on-select @change="selectAddr">
                  </el-cascader>
                </div>
                <div class="layui-input-inline" style="width:500px">
                  <el-input type="text" v-model="prpData.PRPCORPSEADDRESS" style="width:500px"></el-input>
                </div>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">业务类别</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPYITIQX">
                  <el-option :key="item.CodeValue" :label="item.CodeName" :value="item.CodeValue" v-for="item in serviceListType"></el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="!hiddenjylb">
              <label class="layui-form-label">接运类别</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPFEEDERCATEGORY">
                  <el-option label="不选择" :value="null"></el-option>
                  <el-option v-for="item in feeders" :key="item.value" :label="item.CodeName" :value="item.CodeName">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="!isShowyy&&!hiddencldw">
              <label class="layui-form-label">处理单位</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPPROCESSINGUNIT"></el-input>
              </div>
            </div>
            <div class="layui-inline" v-if="isShowyy">
              <label class="layui-form-label" style="text-align:center;padding:0;">死亡证明部门</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPPROCESSINGUNIT"></el-input>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">联系人1</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPLINKMAN"></el-input>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">联系电话</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPLINKPHONE"></el-input>
              </div>
            </div>

            <div class="layui-inline">
              <label class="layui-form-label">来电日期</label>
              <div class="layui-input-inline chooseTime">
                <el-date-picker type="date" v-date v-model="prpData.PRPCALLDATE"></el-date-picker>

              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">联系人2</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPSPARELINKMAN"></el-input>
              </div>
            </div>
            <div class="layui-inline">
              <label class="layui-form-label">联系电话</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPSPARELINKPHONE"></el-input>
              </div>
            </div>
            <div class="layui-inline" v-if="isshow">
              <label class="layui-form-label">火化炉</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPCREMATION" filterable>
                  <el-option v-for="item in hhldata" :key="item.Value" :label="item.Text" :value="item.Value">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="isshow">
              <label class="layui-form-label">是否带棺</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPISCOFFIN" filterable>
                  <el-option v-for="item in isdg" :key="item.Value" :label="item.Text" :value="item.Value">
                  </el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="IsChargeAndSpecial">
              <el-tooltip class="item" effect="dark" content="是否是特殊尸体" placement="top-start">
                <label class="layui-form-label">是否特尸</label>
              </el-tooltip>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPISSPECIAL" filterable>
                  <el-option label="特尸" value="1"></el-option>
                  <el-option label="非特尸" value="0"></el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="IsChargeAndSpecial">
              <label class="layui-form-label">是否值班</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.Cdh.CDHISCHARGE" filterable>
                  <el-option label="值班" value="1"></el-option>
                  <el-option label="非值班" value="0"></el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="IsShowOvertimeAndLift">
              <label class="layui-form-label">是否抬尸</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.PRPISLIFTUP" filterable>
                  <el-option label="抬尸" value="1"></el-option>
                  <el-option label="不抬尸" value="0"></el-option>
                </el-select>
              </div>
            </div>
            <div class="layui-inline" v-if="IsShowOvertimeAndLift || IsShowOvertime">
              <label class="layui-form-label">是否加班</label>
              <div class="layui-input-inline">
                <el-select v-model="prpData.Cdh.CDHISWORKOVERTIME" filterable>
                  <el-option label="加班" value="1"></el-option>
                  <el-option label="不加班" value="0"></el-option>
                </el-select>
              </div>
            </div>
          </div>

          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">备注</label>
              <div class="layui-input-inline">
                <el-input style="width:770px" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容" v-model="prpData.PRPDESCRIBE">
                </el-input>
              </div>
            </div>
          </div>
          <div class="layui-form-item">
          </div>
        </div>
        <fieldset class="layui-elem-field layui-field-title" v-if="!isShowyy">
          <legend>
            <icon-svg icon-class="fwxm" />&nbsp;服务项目</legend>
        </fieldset>
        <div class="layui-form-item" style="padding-left:130px" v-if="!isShowyy">
          <el-checkbox-group v-model="checkedItem" @change="ServiceItemsChange">
            <el-checkbox v-for="value in ServiceItemsList" :label="value.SITID" :key="value.SITID" @change="changItem($event,value)">{{value.SITNAME}}</el-checkbox>
          </el-checkbox-group>
        </div>
      </div>
      <div class="layui-form-item btnCenter">
        <el-button @click="closeDialog">取消</el-button>
        <el-button type="primary" :loading="this.$store.state.isloading" @click="submit">提交</el-button>
      </div>
    </sweet-modal>
    <!-- 详情 -->
    <sweet-modal ref="info" class="dialog" :sweetModalMaxWidth="maxWidth">
      <h3>{{title}}</h3>
      <label>业务编号：{{prpData.PRPNO}}</label>
      <fieldset class="layui-elem-field layui-field-title">
        <legend>基本信息</legend>
      </fieldset>
      <div style="margin:10px 50px;">
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">逝者姓名</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPDEADNAME" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">逝者年龄</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPDEADAGE" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">逝者性别</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPDEADSEXDESC" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline" v-if="IsShowDeathDate">
            <label class="layui-form-label">死亡日期</label>
            <div class="layui-input-inline">
              <el-date-picker readonly type="date" v-date v-model="prpData.PRPDEATHDATE"></el-date-picker>
            </div>
          </div>
          <div class="layui-inline" v-if="IsShowDeathReason">
            <label class="layui-form-label">死亡原因</label>
            <div class="layui-input-inline">
              <el-cascader disabled :options="cause" v-model="cauinfo" filterable>
              </el-cascader>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">接尸时间</label>
            <div class="layui-input-inline chooseTime">
              <el-date-picker style="width:115px;float:left;" clear-icon="null" type="date" v-date v-model="prpData.PRPWORKDATE" readonly></el-date-picker>
              <el-time-picker ref="choosetime" style="width:75px;float:left" clear-icon="null" v-date v-model="prpData.PRPWORKTIME" format='HH:mm' readonly></el-time-picker>
            </div>
          </div>
          <div class="layui-inline" v-if="DisReserveNum">
              <label class="layui-form-label">预约编号</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPDAYNUM" readonly></el-input>
              </div>
            </div>
          <div class="layui-inline" v-if="!isShowyy">
            <label class="layui-form-label">车辆类型</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="cdhcartype" readonly></el-input>

            </div>
          </div>
          <div class="layui-inline" v-if="!isShowyy">
            <label class="layui-form-label">接运车辆</label>
            <div class="layui-input-inline" ref="pickupcars">
              <el-input type="text" v-model="pickupcar" readonly></el-input>

            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">出车里程</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.Cdh.CDHMILEAGE" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline" v-if="!isShowyy">
            <label class="layui-form-label">驾驶员</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.Cdh.STANAME" readonly></el-input>

            </div>
          </div>
          <div class="layui-inline" v-if="IsShowOvertimeAndLift">
            <label class="layui-form-label">接运员</label>
            <div class="layui-input-inline">
              <el-select v-model="collectMember" placeholder="接运员" multiple disabled>
                <el-option v-for="item in carriers" :key="item.value" :label="item.label" :value="item.value"></el-option>
              </el-select>
            </div>
          </div>
        </div>
        <div class="layui-form-item">
          <div class="layui-form-item">
            <div class="layui-inline">
              <label class="layui-form-label">接尸地点</label>
              <div class="layui-input-inline">
                <el-input type="text" v-model="prpData.PRPCORPSEADDRESS" style="width:770px"></el-input>

              </div>

            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">业务类别</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPYITIQXDESC" readonly></el-input>

            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">接运类别</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPFEEDERCATEGORY" readonly></el-input>

            </div>
          </div>
          <div class="layui-inline" v-if="!isShowyy">
            <label class="layui-form-label">处理单位</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPPROCESSINGUNIT" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline" v-if="isShowyy">
            <label class="layui-form-label" style="text-align:center;padding:0;">死亡证明部门</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPPROCESSINGUNIT" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">联系人1</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPLINKMAN" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPLINKPHONE" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">来电日期</label>
            <div class="layui-input-inline">
              <el-date-picker type="date" placeholder="选择日期" v-model="prpData.PRPCALLDATE" format="yyyy-MM-dd" readonly></el-date-picker>
            </div>
          </div>
        </div>
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">联系人2</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPSPARELINKMAN" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline">
            <label class="layui-form-label">联系电话</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPSPARELINKPHONE" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline" v-if="isshow">
            <label class="layui-form-label">火化炉</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPCREMATIONDESC" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline" v-if="isshow">
            <label class="layui-form-label">是否带棺</label>
            <div class="layui-input-inline">
              <el-input type="text" v-model="prpData.PRPISCOFFINDESC" readonly></el-input>
            </div>
          </div>
          <div class="layui-inline" v-if="IsChargeAndSpecial">
            <label class="layui-form-label">是否特尸</label>
            <div class="layui-input-inline">
              <el-select v-model="prpData.PRPISSPECIAL" filterable disabled>
                <el-option label="特尸" value="1"></el-option>
                <el-option label="非特尸" value="0"></el-option>
              </el-select>
            </div>
          </div>
          <div class="layui-inline" v-if="IsChargeAndSpecial">
            <label class="layui-form-label">是否值班</label>
            <div class="layui-input-inline">
              <el-select v-model="prpData.Cdh.CDHISCHARGE" filterable disabled>
                <el-option label="值班" value="1"></el-option>
                <el-option label="非值班" value="0"></el-option>
              </el-select>
            </div>
          </div>
          <div class="layui-inline" v-if="IsShowOvertimeAndLift">
            <label class="layui-form-label">是否抬尸</label>
            <div class="layui-input-inline">
              <el-select v-model="prpData.PRPISLIFTUP" filterable disabled>
                <el-option label="抬尸" value="1"></el-option>
                <el-option label="不抬尸" value="0"></el-option>
              </el-select>
            </div>
          </div>
          <div class="layui-inline" v-if="IsShowOvertimeAndLift || IsShowOvertime">
            <label class="layui-form-label">是否加班</label>
            <div class="layui-input-inline">
              <el-select v-model="prpData.Cdh.CDHISWORKOVERTIME" filterable disabled>
                <el-option label="加班" value="1"></el-option>
                <el-option label="不加班" value="0"></el-option>
              </el-select>
            </div>
          </div>
        </div>
        <div class="layui-form-item">
          <div class="layui-inline">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-inline">
              <el-input style="width:770px" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="请输入内容" v-model="prpData.PRPDESCRIBE" readonly>
              </el-input>
            </div>
          </div>
        </div>
      </div>
      <fieldset class="layui-elem-field layui-field-title" v-if="!isShowyy">
        <legend>服务项目</legend>
      </fieldset>
      <div style="margin:30px 50px;" v-if="!isShowyy">
        <el-checkbox-group v-model="checkedItem" @change="ServiceItemsChange">
          <el-checkbox v-for="value in ServiceItemsList" :label="value.SITID" :key="value.SITID" disabled>{{value.SITNAME}}</el-checkbox>
        </el-checkbox-group>
      </div>
      <div class="layui-form-item btnCenter">
        <el-button @click="infoClose">取消</el-button>
      </div>
    </sweet-modal>
    <printPdf ref="prints"></printPdf>
  </div>
</template>

<style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/common.scss";
.el-button + .el-button {
    margin-left: 0;
}
.longtext {
    width: 480px;
}
.longertext {
    width: 770px;
}
.sweet-btn {
    margin-top: 20px;
}
</style>
<script>
import apiBase from "@/api/apiBase.js";
import sweetModal from "@/components/sweetModal";
import printPdf from "@/components/Pdf/Print";
import { manage } from "@/mixins/managePage.js";
import { formatDate, timeStringToDate } from "@/utils/date.js";
import { PRPORDER } from "@/const/orderConst.js";
import { ORDER } from "@/const/orderConst.js";
const onecar = "普通车";
const twocar = "高档车";
const threecar = "自送";
export default {
    mixins: [manage],
    data() {
        return {
            isnoselect:false, // 是否默认接运车辆值（上虞为true， 不默认下拉值）
            hiddenjylb:[],// 是否显示接运类别 （上虞为true 则不显示这个字段）
            hiddencldw:[],// 是否显示处理单位（上虞为true 则不显示这个字段）
            addressOptions: [], //地址选项
            arr: [], //地址
            isAdd: true, //接收返回的值判断地址选择类型
            isaddress: false,
            //上面是新加的
            carriers: [],
            cauinfo: [],
            cause: [],
            isshow: null,
            // 个性化增加是否特尸值班人员
            IsChargeAndSpecial: null,
            // 个性化是否使用常用地址
            IsUseSelect: null,
            // 个性化是否显示 是否加班 是否抬尸 接运员
            IsShowOvertimeAndLift: null,
            // 是否显示 是否加班
            IsShowOvertime: null,
            // 是否显示死亡日期
            IsShowDeathDate: null,
            // 是否显示死亡原因
            IsShowDeathReason: null,
            //奉化车辆个性化
            iscar: null,
            int: 1,
            isShowyy: null, //余姚个性化
            order: null,
            maxWidth: 1100,
            title: null,
            prpWorkDateTime: null,
            prpWorkDateTimeInfo: null,
            addressInfo: null,
            addsInfo: {},
            commonAddr: [],
            commonAddrnew: [],
            wakes: [],
            remains: [],
            feeders: [],
            ispaicar: false,
            isdisable: null,
            timeDefaultShow: [new Date(0,0)],

            //编码
            carLics: [],
            pickupcardatas: [],
            drivers: [],
            isdg: [],
            hhldata: [],
            preSitDesc: null,
            reserveType: [],
            reserveStatus: [],
            serviceListType: [],
            sexType: [],
            ServiceItemsList: [],
            checkedItem: [],
            area: [],
            carryArea: "",
            selectData: {
                TypeEquals: null,
                LinkManLike: null,
                DeadNameLike: null,
                StatusEquals: null
            },
            prpData: {
                PRPID: null,
                PRPNO: null,
                PRPCARDNO: null,
                PRPLINKMAN: null,
                PRPDAYNUM: null,
                PRPDEADAGE: null,
                PRPDEADSEX: null,
                PRPLINKPHONE: null,
                PRPORIGINALCALL: null,
                PRPCALLDATE: null,
                PRPDEADNAME: null,
                PRPYITIQX: null,
                PRPDESCRIBE: "",
                PRPCORPSEADDRESS: null,
                PRPADDID: null,
                PRPLINID: "",
                PRPMEMID: "",
                PRPFEEDERCATEGORY: "",
                PRPWORKDATE: "",
                PRPWORKTIME: null,
                PRPPROCESSINGUNIT: null,
                PRPSPARELINKMAN: null,
                PRPSPARELINKPHONE: null,
                // PRPFEEDERCATEGORY:'',
                PRPLINSTRTDATE: null,
                PRPLINSTRTIME: null,
                PRPMEMSTRDATE: null,
                PRPMENSTRTIME: null,
                PRPCREMATION: null,
                PRPISCOFFIN: null,
                CauseOfDeath: null,
                // 是否特尸
                PRPISSPECIAL: "0",
                // 是否抬尸
                PRPISLIFTUP: "0",
                //服务项目预约信息
                Psts: [],
                //派车信息
                Cdh: {
                    CDHCARID: null,
                    CARLIC: null,
                    CARCODNAME: null,
                    CARCODNAMEDESC: null,
                    CDHDRIVER: null,
                    STANAME: null,
                    // 是否值班人员
                    CDHISCHARGE: "0",
                    // 是否加班
                    CDHISWORKOVERTIME: "0",
                    // 接运员
                    List_CarryArr: []
                },
                PRPDEATHDATE: ""
            },
            regDataEexend: {
                leasetime: null,
                appointmenttime: null
            },
            cdhcar: ["", ""],
            carType: null,
            cdhcartype: null,
            pickupcar: null,
            collectMember: [],
            selectedOptions2: [],
            DisReserveNum: false
        };
    },
    methods: {
        open(order, id) {
            this.ispaicar = id;
            this.isdisable = id;
            this.order = order;
            this.maxHeight = window.innerHeight - 240;
            //清理数据
            // this.prpData.PRPCALLDATE=new Date();
            switch (this.order) {
                case PRPORDER.ADD:
                    this.dataRepeat(); //数据重置
                    this.title = "电话预约新增";
                    this.initSelectData(); //初始化下拉框
                    this.prpData.PRPWORKDATE = new Date();
                    this.regDataEexend.leasetime = new Date();
                    this.regDataEexend.appointmenttime = new Date();
                    this.$refs.dialog.open();
                    break;
                case PRPORDER.MODIFY:
                    this.title = "电话预约修改";
                    this.prpData.Psts = [];
                    this.initSelectData();
                    this.dataInfo(id);
                    this.$refs.dialog.open();
                    break;
                case PRPORDER.INFO:
                    this.title = "电话预约详情";
                    this.dataRepeat();
                    this.initSelectData();
                    this.dataInfo(id);
                    this.$refs.info.open();
                    break;
                default:
            }
        },
        // 判断接尸地址是否使用二级级联 true/false
        getNew() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Param.GetIsCorpseUseCascade,
                res => {
                    this.isAdd = res.data.content;
                    if (this.isAdd == false) {
                        //获取常用地址
                        this.isaddress = true;
                        let data = {};
                        apiBase.DoService(
                            data,
                            apiBase.getApiAdress().Code.GetCommonAddress,
                            res => {
                                this.commonAddr = res.data.content;
                            }
                        );
                    } else {
                        this.isaddress = false;
                        this.getcityType();
                    }
                }
            );
        },
        //获取预约地址 (多级)-----------------------------------------------------------------------------
        //获取预约地址
        getcityType() {
            // 获取级联选择
            apiBase.DoService(
                {},
                apiBase.getApiAdress().Reserve.GetBorough,
                res => {
                    let datas = res.data.content;
                    this.addressOptions = datas.map(item => ({
                        label: item.AFCADDRESS,
                        value: item.AFCID,
                        children: this.restructur(item.ListFulafc)
                    }));
                }
            );
        },
        restructur(value) {
            let arr = JSON.parse(JSON.stringify(value));
            var data = [];
            arr.forEach(item => {
                if (item.ListFulafc.length > 0) {
                    data.push({
                        label: item.AFCADDRESS,
                        value: item.AFCID,
                        children: this.restructur(item.ListFulafc)
                    });
                } else {
                    data.push({
                        label: item.AFCADDRESS,
                        value: item.AFCID
                    });
                }
            });
            return data;
        },
        //地址模板(详细地址)
        selectAddr(value) {
            if (this.isAdd == false) {
                if (this.prpData.PRPADDID != null) {
                    this.prpData.PRPCORPSEADDRESS = this.prpData.PRPADDID + "";
                }
            } else {
                let text = this.$refs.address.currentLabels + "";
                let arr = text.split(",");
                text = arr.join("");
                this.$set(this.prpData, "PRPCORPSEADDRESS", text);
            }
        },
        pickupcardata(val) {
            switch (val) {
                case onecar: //普通车
                    for (var i = 0; i < this.carLics.length; i++) {
                        if (this.carLics[i].label == onecar) {
                            this.pickupcardatas = this.carLics[i].children;
                            // return;
                        }
                    }
                    if (this.pickupcardatas.length == 0) {
                        this.pickupcar = null;
                    } else {
                        if(this.isnoselect){
                            this.pickupcar=""
                        }else{
                            this.pickupcar = this.pickupcardatas[0].label; // 上虞
                        } 
                    }
                    break;
                case twocar: //高档车
                    for (var i = 0; i < this.carLics.length; i++) {
                        if (this.carLics[i].label == twocar) {
                            this.pickupcardatas = this.carLics[i].children;
                            // return;
                        }
                    }
                    // this.pickupcardatas = this.carLics[1].children;
                    if (this.pickupcardatas.length == 0) {
                        this.pickupcar = null;
                    } else {
                        this.pickupcar = this.pickupcardatas[0].label;
                    }
                    break;
                case threecar: //自送车
                    for (var i = 0; i < this.carLics.length; i++) {
                        if (this.carLics[i].label == threecar) {
                            this.pickupcardatas = this.carLics[i].children;
                            // return;
                        }
                    }
                    // this.pickupcardatas = this.carLics[2].children;
                    if (this.pickupcardatas.length == 0) {
                        this.pickupcar = null;
                    } else {
                        this.pickupcar = this.pickupcardatas[0].label;
                    }
                    break;
                default:
            }
        },

        //获取死亡原因
        getCausa() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetCausa,
                res => {
                    let caudata = res.data.content;
                    this.cause = caudata.map(item => ({
                        label: item.CAENAME,
                        value: item.CAEID,
                        children: item.Caus.map(itemCau => ({
                            label: itemCau.CAUNAME,
                            value: itemCau.CAUID
                        }))
                    }));
                    if (this.CauseOfDeath) {
                        this.cauinfo = [];
                    } else {
                        if (this.cause[0] && this.cause[0].children[0])
                            this.cauinfo = [
                                this.cause[0].value,
                                this.cause[0].children[0].value
                            ];
                    }
                }
            );
        },

        //初始化下拉框数据
        initSelectData() {
            //初始化下拉框数据
            this.getReserveType();
            this.getSexType();
            this.getReserveStatus();
            this.getServiceItems();
            this.getCar();
            // this.getCommonAddr();
            // this.getcityType(); //二级接口
            this.getCausa();
            this.getServiceTypes();
            this.getDrivers();
            this.getWakes();
            this.getRemains();
            this.getFeeders();
            this.GetIsCoffinStatus();
            this.GetCreationStatus();
            this.getCarriers();
        },
        //提交
        submit() {
            switch (this.order) {
                case PRPORDER.ADD:
                    this.dataAdd();
                    break;
                case PRPORDER.MODIFY:
                    this.dataModify();
                    break;
                case PRPORDER.DELETE:
                    break;
                case PRPORDER.INFO:
                    break;
                default:
            }
        },
        closeDialog() {
            if (this.order === PRPORDER.ADD || this.order === PRPORDER.MODIFY)
                this.$refs.dialog.close();
            else if (this.order === PRPORDER.INFO) this.$refs.info.close();
        },
        //跳转派车登记
        Gosendcar() {},
        //获取预约类型
        getReserveType() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetReserveType,
                res => {
                    this.reserveType = res.data.content;
                }
            );
        },

        //接运类别
        getFeeders() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetFeederCategory,
                res => {
                    this.feeders = res.data.content;
                }
            );
        },
        //获取租用守灵
        getWakes() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().MourningUse.QueryMourning,
                res => {
                    this.wakes = res.data.content;
                }
            );
        },
        //获取遗体告别
        getRemains() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().MemorialUse.QueryMemorial,
                res => {
                    this.remains = res.data.content;
                }
            );
        },
        //获取性别
        getSexType() {
            let data = {};
            apiBase.DoService(data, apiBase.getApiAdress().Code.GetSex, res => {
                this.sexType = res.data.content;
            });
        },
        //获取预约状态
        getReserveStatus() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Reserve.GetReserveStatus,
                res => {
                    this.reserveStatus = res.data.content;
                }
            );
        },
        //获取服务类型
        getServiceTypes() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetYitiqx,
                res => {
                    this.serviceListType = res.data.content;
                    this.prpData.PRPYITIQX = this.serviceListType[0].CodeValue;
                }
            );
        },
        //获取服务项目
        getServiceItems() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Reserve.QueryServiceItem,
                res => {
                    let serviceList = res.data.content;
                    this.ServiceItemsList = [];
                    for (var i in serviceList) {
                        this.ServiceItemsList.push.apply(
                            this.ServiceItemsList,
                            serviceList[i].Sits
                        );
                    }
                }
            );
        },
        //获取预约火化炉类型
        GetCreationStatus() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Code.GetCremationType,
                res => {
                    let creTypeData = res.data.content,
                        legendsCreData = creTypeData.map(item => ({
                            Text: item.CodeName,
                            Value: item.CodeValue
                        }));
                    this.hhldata = legendsCreData;
                }
            );
        },
        //获取预约是否带棺
        GetIsCoffinStatus() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Reserve.GetPrpIsCoffinStatus,
                res => {
                    this.isdg = res.data.content;
                }
            );
        },
        //获取车辆信息
        getCar() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Car.QueryCarByType,
                res => {
                    let cardata = res.data.content;
                    let legendsCarData = cardata.map(item => ({
                        label: item.CodeName,
                        value: item.CodeValue,
                        children: item.list_Cars.map(caritem => ({
                            label: caritem.CARLIC,
                            value: caritem.CARID
                        }))
                    }));
                    this.carLics = legendsCarData;
                    if (this.carLics.length > 0) {
                        this.cdhcartype = this.carLics[
                            this.carLics.length - 1
                        ].label; //车辆类型
                        this.pickupcar = this.carLics[
                            this.carLics.length - 1
                        ].children[0].label; //接运车辆
                    } else {
                        this.cdhcartype = "";
                        this.pickupcar = "";
                    }
                    this.pickupcardata(this.cdhcartype);
                }
            );
        },
        //获取司机
        getDrivers() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Staff.QueryDriver,
                res => {
                    let driverData = res.data.content,
                        legendsDrivers = driverData.map(item => ({
                            label: item.STANAME,
                            value: item.STAID
                        }));
                    this.drivers = legendsDrivers;
                }
            );
        },
        //获取接运员
        getCarriers() {
            let data = {};
            apiBase.DoService(
                data,
                apiBase.getApiAdress().Staff.QueryCarry,
                res => {
                    let carryData = res.data.content,
                        legendsCarriers = carryData.map(item => ({
                            label: item.STANAME,
                            value: item.STAID
                        }));
                    this.carriers = legendsCarriers;
                }
            );
        },
        //登记新增
        dataAdd() {
            for (var i in this.pickupcardatas) {
                if (this.pickupcardatas[i].label == this.pickupcar) {
                    this.prpData.Cdh.CDHCARID = this.pickupcardatas[i].value;
                }
            }
            // this.prpData.Cdh.CDHCARID = this.cdhcar[this.cdhcar.length - 1];
            let Data = JSON.parse(JSON.stringify(this.prpData));
            if (Data.PRPLINID == "") {
                Data.PRPLINSTRTDATE = "";
                Data.PRPLINSTRTIME = "";
            } else {
                Data.PRPLINSTRTDATE = formatDate(
                    this.regDataEexend.leasetime,
                    "yyyyMMdd"
                );
                Data.PRPLINSTRTIME = formatDate(
                    this.regDataEexend.leasetime,
                    "hhmmss"
                );
            }
            if (Data.PRPMEMID == "") {
                Data.PRPMEMSTRDATE = "";
                Data.PRPMENSTRTIME = "";
            } else {
                Data.PRPMEMSTRDATE = formatDate(
                    this.regDataEexend.appointmenttime,
                    "yyyyMMdd"
                );
                Data.PRPMENSTRTIME = formatDate(
                    this.regDataEexend.appointmenttime,
                    "hhmmss"
                );
            }
            Data.PRPDEATHDATE = formatDate(Data.PRPDEATHDATE, "yyyyMMdd");
            Data.PRPCALLDATE = formatDate(Data.PRPCALLDATE, "yyyyMMdd");
            Data.PRPWORKDATE = formatDate(Data.PRPWORKDATE, "yyyyMMdd");
            Data.PRPWORKTIME = formatDate(Data.PRPWORKTIME, "hhmm") + "00";
            if (this.isAdd == true) {
                //接尸地址
                Data.PRPADDID = this.arr[this.arr.length - 1];
                //--------------
            }
            Data.PRPCAUSA = this.cauinfo[0];
            Data.PRPCAUSASON = this.cauinfo[1];
            Data.Cdh.STANAME = this.prpData.Cdh.STANAME;
            Data.Cdh.list_CarryArr = this.collectMember;
            apiBase.DoService(
                Data,
                apiBase.getApiAdress().Reserve.CreatePhoneReserve,
                res => {
                    this.addsInfo = res.data.content;
                    this.$confirm("是否打印派车单?", "新增成功", {
                        confirmButtonText: "打印",
                        cancelButtonText: "不打印",
                        type: "warning"
                    })
                        .then(() => {
                            this.$refs.prints.open(
                                "打印派车单",
                                this.addsInfo.PRPID,
                                null
                            );
                            this.refreshData();
                        })
                        .catch(() => {
                            this.$message({
                                type: "success",
                                message: "新增成功!"
                            });
                            this.refreshData();
                        });
                    this.$refs.dialog.close();
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //登记修改
        dataModify() {
            for (var i in this.pickupcardatas) {
                if (this.pickupcardatas[i].label == this.pickupcar) {
                    this.prpData.Cdh.CDHCARID = this.pickupcardatas[i].value;
                }
            }
            for (var i = 0; i < this.checkedItem.length - 1; i++) {
                for (var j = i + 1; j < this.checkedItem.length; j++) {
                    if (
                        this.checkedItem[i].PSTSITID ==
                        this.checkedItem[j].PSTSITID
                    ) {
                        this.checkedItem.splice(j, 1);
                        j--;
                    }
                }
            }
            let Data = JSON.parse(JSON.stringify(this.prpData));
            if (this.isAdd == true) {
                //接尸地址
                Data.PRPADDID = this.arr[this.arr.length - 1];
                //--------------
            }
            if (Data.PRPFEEDERCATEGORY == null) {
                Data.PRPFEEDERCATEGORY = "";
            }
            if (Data.PRPLINID == null) {
                Data.PRPLINID = "";
            }
            if (Data.PRPMEMID == null) {
                Data.PRPMEMID = "";
            }
            if (Data.PRPLINID == "") {
                Data.PRPLINSTRTDATE = "";
                Data.PRPLINSTRTIME = "";
            } else {
                Data.PRPLINSTRTDATE = formatDate(
                    this.regDataEexend.leasetime,
                    "yyyyMMdd"
                );
                Data.PRPLINSTRTIME = formatDate(
                    this.regDataEexend.leasetime,
                    "hhmmss"
                );
            }
            if (Data.PRPMEMID == "") {
                Data.PRPMEMSTRDATE = "";
                Data.PRPMENSTRTIME = "";
            } else {
                Data.PRPMEMSTRDATE = formatDate(
                    this.regDataEexend.appointmenttime,
                    "yyyyMMdd"
                );
                Data.PRPMENSTRTIME = formatDate(
                    this.regDataEexend.appointmenttime,
                    "hhmmss"
                );
            }
            Data.PRPDEATHDATE = formatDate(Data.PRPDEATHDATE, "yyyyMMdd");
            Data.PRPCALLDATE = formatDate(Data.PRPCALLDATE, "yyyyMMdd");
            Data.PRPWORKDATE = formatDate(Data.PRPWORKDATE, "yyyyMMdd");
            Data.PRPWORKTIME = formatDate(Data.PRPWORKTIME, "hhmm") + "00";
            Data.PRPCAUSA = this.cauinfo[0];
            Data.PRPCAUSASON = this.cauinfo[1];
            Data.Cdh.STANAME = this.prpData.Cdh.STANAME;
            Data.Cdh.list_CarryArr = this.collectMember;

            apiBase.DoService(
                Data,
                apiBase.getApiAdress().Reserve.ModifyPhoneReserve,
                res => {
                    this.$refs.dialog.close();
                    this.$message({
                        type: "success",
                        message: "修改成功!"
                    });
                    this.refreshData();
                },
                res => {
                    this.$message.error(res.data.msg);
                }
            );
        },
        //登记详情
        dataInfo(id) {
            let Data = {
                PRPID: id
            };
            apiBase.DoService(
                Data,
                apiBase.getApiAdress().Reserve.DetailPhoneReserve,
                res => {
                    this.prpData = res.data.content;
                    console.log(this.prpData.PRPADDID);

                    // this.carryArea = this.prpData.PRPCORPSEADDRESS;
                    this.regDataEexend.leasetime = timeStringToDate(
                        this.prpData.PRPLINSTRTIME,
                        this.prpData.PRPLINSTRTDATE
                    );
                    this.regDataEexend.appointmenttime = timeStringToDate(
                        this.prpData.PRPMENSTRTIME,
                        this.prpData.PRPMEMSTRDATE
                    );
                    this.prpData.PRPWORKTIME = timeStringToDate(
                        this.prpData.PRPWORKTIME
                    );
                    if (!this.prpData.Cdh) {
                        this.cdhcar = ["", ""];
                        this.carType = "自送";
                        this.pickupcar=""
                    } else {
                        this.cdhcartype = this.prpData.Cdh.CARCODNAMEDESC;
                        this.carType =
                            this.prpData.Cdh.CARCODNAMEDESC +
                            "/" +
                            this.prpData.Cdh.CARLIC;
                        this.pickupcardata(this.cdhcartype);
                        if (this.prpData.Cdh) {
                            this.pickupcar = this.prpData.Cdh.CARLIC;
                        } else {
                            this.pickupcar = null;
                        }

                        this.cdhcar = [
                            this.prpData.Cdh.CARCODNAME,
                            this.prpData.Cdh.CDHCARID
                        ];
                        this.collectMember = res.data.content.Cdh.list_CarryArr;
                    }
                    //  this.getServiceItems();
                    if (!this.prpData.Psts) {
                        this.prpData.Psts = [];
                    }
                    if (!this.prpData.Cdh) {
                        this.prpData.Cdh = {
                            CDHCARID: null,
                            CDHDRIVER: null
                        };
                    }
                    let psts = res.data.content.Psts;
                    for (var i in psts) {
                        this.checkedItem.push(psts[i].PSTSITID);
                    }
                    this.cauinfo = [
                        this.prpData.PRPCAUSA,
                        this.prpData.PRPCAUSASON
                    ];

                    if (this.prpData.PRPDEATHDATE) {
                        this.prpData.PRPDEATHDATE = formatDate(
                            this.prpData.PRPDEATHDATE,
                            "yyyy-MM-dd"
                        );
                    }
                    //多级地址选择详情
                    if (this.isAdd == true) {
                        apiBase.DoService(
                            { AFCID: this.prpData.PRPADDID },
                            apiBase.getApiAdress().Reserve.GetBoroughByID,
                            res => {
                                this.arr = res.data.content; //地址选择详情
                            }
                        );
                    }
                }
            );
        },

        //服务项目选择
        ServiceItemsChange(serItems) {
            let newserItems = serItems.filter(function(element, index, self) {
                return self.indexOf(element) === index;
            });
            let pstsList = [];
            for (var i in newserItems) {
                var pst = {
                    PSTSITID: newserItems[i],
                    PSTNUMBER: 1
                };
                this.preSitDesc += pstsList.push(pst);
            }
            this.prpData.Psts = pstsList;
        },
        //服务项目选择
        changItem(el, val) {
            var staname = val.SITNAME + "。";
            if (el) {
                this.prpData.PRPDESCRIBE += staname;
            } else {
                this.prpData.PRPDESCRIBE = this.prpData.PRPDESCRIBE.replace(
                    staname,
                    ""
                );
            }
        },
        //数据重置
        dataRepeat() {
            this.prpWorkDateTime = null;
            this.carryArea = "";
            this.pcrFirst = false;
            this.preFirst = false;
            this.checkedItem = [];
            this.pickupcardatas = [];
            this.cdhcar = ["自送", "330109X0F1CAR20171227000000018"];
            this.cauinfo = [];
            this.cdhcartype = null;
            this.pickupcar = null;
            Object.assign(this.$data.prpData, this.$options.data().prpData);
            this.prpData.PRPCALLDATE = formatDate(new Date(), "yyyy-MM-dd");
            this.regDataEexend.leasetime = null;
            this.regDataEexend.appointmenttime = null;
            this.collectMember = [];
            this.arr = []; //地址选择清空
        },
        refreshData() {
            this.$emit("refreshData");
        }
    },
    created() {
        let data = {};
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsReserveNoCAR,
            res => {
                this.isnoselect = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetPrpIsCoffinandCre,
            res => {
                this.isshow = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsChargeAndSpecial,
            res => {
                this.IsChargeAndSpecial = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsUseSelect,
            res => {
                this.IsUseSelect = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsShowOvertimeAndLift,
            res => {
                this.IsShowOvertimeAndLift = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsShowOvertime,
            res => {
                this.IsShowOvertime = res.data.content;
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsShowOutOfTime,
            res => {
                this.isShowyy = res.data.content; //余姚个性化
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsShowPickCategory,
            res => {
                this.hiddenjylb = res.data.content; //上虞个性化（不显示） 电话预约是否显示接运类别 
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetIsShowProcessingUnit,
            res => {
                this.hiddencldw = res.data.content; //上虞个性化（不显示） 电话预约是否显示处理单位
            }
        );
        apiBase.DoService(
            data,
            apiBase.getApiAdress().Param.GetReserveCarNol,
            res => {
                this.iscar = res.data.content; //余姚个性化
                // if(this.iscar){this.cdhcartype = '普通车'}
            }
        );
        //是否默认死亡原因（义乌，兰溪不默认）
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsDefaultCauseOfDeath,
            res => {
                this.CauseOfDeath = res.data.content;
            }
        );
        // 电话预约是否显示死亡日期(嵊州显示)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowDeathDate,
            res => {
                this.IsShowDeathDate = res.data.content;
            }
        );
        //电话预约是否显示死亡原因(嵊州显示)
        apiBase.DoService(
            {},
            apiBase.getApiAdress().Param.GetIsShowDeathReason,
            res => {
                this.IsShowDeathReason = res.data.content;
            }
        );
        // 个性化数据导入的时候是否显示预约编号(萧山)
        apiBase.DoService(
          data,
          apiBase.getApiAdress().Param.GetIsDisReserveNum,
          res => {
            this.DisReserveNum = res.data.content;
          }
        );

        this.getNew(); //接尸地址是否使用二级级联
    },
    components: {
        sweetModal,
        printPdf
    },
    watch: {
        "regDataEexend.leasetime": function(val) {
            this.prpData.PRPLINSTRTDATE = formatDate(val, "yyyyMMdd");
            this.prpData.PRPLINSTRTIME = formatDate(val, "hhmmss");
        },
        "regDataEexend.appointmenttime": function(val) {
            this.prpData.PRPMEMSTRDATE = formatDate(val, "yyyyMMdd");
            this.prpData.PRPMENSTRTIME = formatDate(val, "hhmmss");
        }
    }
};
</script>

